package spaceCraft;

import java.util.ArrayList;

public class SpacePort {

    ArrayList shipList;

    public SpacePort() {
        shipList = new ArrayList();
    }

    public boolean addNewShipToHangar(SpaceShip ship) {
        if (ship == null) {
            return false;
        }
        return shipList.add(ship);
    }

    public boolean sellSpecifiedShip(SpaceShip ship) {
        if (ship == null) {
            return false;
        }
        return shipList.remove(ship);
    }

    public boolean isInHangar(SpaceShip ship) {
        if (ship == null) {
            return false;
        }
        return shipList.contains(ship);
    }
}